//
//  MyAccountNavBar.m
//  HuaMuJinRong
//
//  Created by Cindy on 15/12/18.
//  Copyright (c) 2015年 EIMS. All rights reserved.
//

#import "MyAccountNavBar.h"

@interface MyAccountNavBar ()


@end

@implementation MyAccountNavBar

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        CGFloat width = KAdaptNum(100);
        
        _backView = [UIView viewWithFrame:CGRectMake(5, 0, width + 36 + 5, 44) backgroundColor:nil superview:self];
   
        _headerImageView = [UIImageView imageViewWithFrame:CGRectMake(0, (CGRectGetHeight(_backView.frame)-36)/2, 36, 36) imageFile:@"default_head" superview:_backView];
        _headerImageView.clipsToBounds = YES;
        _headerImageView.layer.cornerRadius = _headerImageView.frame.size.width/2;
        _headerImageView.userInteractionEnabled = YES;
        
        _usernameLabel = [UILabel labelWithFrame:CGRectMake(CGRectGetMaxX(_headerImageView.frame)+5, 0, width, _backView.frame.size.height) text:@"" textColor:[UIColor whiteColor] textFont:15.0 fitWidth:YES superview:_backView];
        _usernameLabel.userInteractionEnabled = YES;

        NSString *billStr = @"交易记录";
        CGFloat billWidth = [MyTools getSizeOfString:billStr maxWidth:200 maxHeight:GetHeight(_backView) withFontSize:15].width;
        
        _billButton = [UIButton buttonWithFrame:RECTMAKE(MSWIDTH - billWidth - 15, 0, billWidth, GetHeight(_backView))  backgroundColor:nil title:@"交易记录" titleColor:[UIColor whiteColor] titleFont:15 target:self action:nil superview:self];

        
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
